package com.dayuanit.dy15.atm.task;

import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @EnableScheduling开启定时器功能
 * @EnableAsync 开启异步执行
 */
@Component
public class TestTask {

    public TestTask() {
        System.out.println("tesetTask()");
    }

//    @Async  转账的不建议开启并行执行
//    @Scheduled(cron=" */2  *  *  *  *  ?")
    public void processTask() {
//        System.out.println(">>>>>>>hello task");
        //做转入的操作

    }
}
